home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / doodle_d.swf / scripts / frame_3 / DoAction_2.as next >
Text File  |  2013-04-24  |  1KB  |  48 lines

  1. lives = 0;
  2. amountRecord = 0;
  3. dra.onMouseDown = function()
  4. {
  5.    ship.moveTo(_root.ship._xmouse,_root.ship._ymouse);
  6.    ship.lineStyle(2,"0x000000",100);
  7.    dra.onMouseMove = function()
  8.    {
  9.       if(Math.abs(_root._xmouse - ship._x) < 250 && Math.abs(_root._ymouse - ship._y) < 225)
  10.       {
  11.          ship.lineTo(_root.ship._xmouse,_root.ship._ymouse);
  12.       }
  13.       updateAfterEvent();
  14.    };
  15. };
  16. dra.onMouseUp = function()
  17. {
  18.    dra.onMouseMove = null;
  19. };
  20. dra.onEnterFrame = function()
  21. {
  22.    if(Key.isDown(32))
  23.    {
  24.       if(ship._height > 10 && ship._width > 10)
  25.       {
  26.          ship._width > 35;
  27.          while(ship._width > 35)
  28.          {
  29.             ship._yscale -= 0.1;
  30.             amountRecord += 0.1;
  31.             ship._xscale -= 0.1;
  32.          }
  33.          ship._height > 35;
  34.          while(ship._height > 35)
  35.          {
  36.             ship._xscale -= 0.1;
  37.             amountRecord += 0.1;
  38.             ship._yscale -= 0.1;
  39.          }
  40.          nextFrame();
  41.       }
  42.    }
  43.    if(Key.isDown(13))
  44.    {
  45.       ship.clear();
  46.    }
  47. };
  48.